package fr.masterglr.website.googlr;

import org.apache.struts.action.Action;

public class Recherche extends Action{

    /**
	 * Generated Serial Version UID
	 */
	private static final long serialVersionUID = 6341412917020042790L;

	public String execute() throws Exception {
        /*if (isInvalid(getKeywords())) return INPUT;
        return SUCCESS;*/
		if (isInvalid(getKeywords())) return "INPUT";
		return "SUCCESS";
    }

    private boolean isInvalid(String value) {
        return (value == null || value.length() == 0);
    }

    private String keywords;
    
    public String getKeywords() {
        return keywords;
    }
    public void setKeywords(String keywords) {
        this.keywords = keywords;
    }

}